import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        binarySearchTree.insert(10);
        binarySearchTree.insert(15);
        binarySearchTree.insert(17);
        binarySearchTree.insert(8);
        binarySearchTree.insert(40);
        System.out.println("=====");
        System.out.println(binarySearchTree.find(17));
        System.out.println("=====");
        System.out.println(binarySearchTree.find(50));

    }

    public static void main2(String[] args) {
        Person u1 = new Person();
        u1.setName("Java");
        u1.setAge(18);

        Person u2 = new Person();
        u2.setName("Java");
        u2.setAge(18);

        // 打印 equals 结果
        System.out.println("equals 结果：" + u1.equals(u2));
    }


}
class Person {
    private String name;
    private int age;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return age == person.age && Objects.equals(name, person.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}